Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Displaying Rendered • View rawDownload


android/README.md HEAD (b89dc9e6) Text, 3.93 KB

MeshChatX Android (Chaquopy)

Native APK with embedded Python (T383838meshchatx/) and a WebView UI.

Prerequisites

• Android SDK (T383838ANDROID_HOME / T383838ANDROID_SDK_ROOT) with T383838cmdline-tools and a matching NDK (see T383838android/app/build.gradle for the pinned NDK version used in CI).
JDK 17 (Temurin or compatible).
• Chaquopy vendor wheels under T383838android/vendor/ (build locally with T383838bash scripts/build-android-wheels-local.sh from repo root, or use CI artifacts). That script builds native recipes under T383838android/chaquopy-recipes/ and also vendors pure-Python wheels such as bleak and T383838httpx[http2] (for bundled RNS-over-HTTP / T383838HTTPInterface).

Lint and static analysis

Android Lint (Java, Kotlin, manifests, resources): from T383838android/, run T383838./gradlew --no-daemon :app:lintDebug. HTML report: T383838app/build/reports/lint-results-debug.html. CI runs this in the Android workflow when tests run.
SAST (GitHub CodeQL): the repository workflow includes a T383838java-kotlin matrix entry (see T383838.github/workflows/security.yml) for GitHub’s security analysis on default branches and PRs.

Launcher shortcuts, language

App shortcuts (long-press the launcher icon): open Messages (T383838meshchatx://app/messages) and Call (T383838meshchatx://app/call). The WebView handles these in T383838App.vue via T383838handleProtocolLink.
Per-app language (Android 13+): T383838android:localeConfig points to T383838res/xml/locales_config.xml. Add translated T383838values-xx/strings.xml for Android notification/shortcut strings; the in-app language still comes from MeshChatX server config.

Build

From repo root:

T282828
bash scripts/build-android-wheels-local.sh
Tffa657cd android
./gradlew --no-daemon :app:assembleDebug :app:assembleRelease


There is a single application variant (no product flavors). Gradle syncs the entire T383838meshchatx/ tree into T383838app/src/main/python/meshchatx/ (including T383838public/repository-server-bundled for the in-app repository server), and syncs vendored T383838vendor/lxmfy/lxmfy into T383838app/src/main/python/lxmfy/ (required for bots; not installed via Chaquopy pip) plus T383838vendor/rns_filesync/rns_filesync into T383838app/src/main/python/rns_filesync/ (required for FileSync). The T383838fetchRepositoryBundledWheels task runs before sync when bundled wheels are missing; if repo root T383838dist/reticulum_meshchatx-*.whl exists (e.g. from T383838python -m build --wheel -o dist .), that wheel is preferred over PyPI for the bundled set.

Native ABIs (universal APK)

Release and debug artifacts are universal APKs only: one APK per build type, embedding the native libraries for each ABI selected at build time.

T383838-PmeshchatxAbis=... or T383838MESHCHATX_ABIS: comma-separated list from T383838arm64-v8a, T383838x86_64, T383838armeabi-v7a (default: all three). This controls which T383838.so variants are merged into the single universal APK, not separate per-ABI store listings.

Outputs

Each build produces:

• Debug: T383838app/build/outputs/apk/debug/app-debug.apk
• Release (unsigned until you sign): T383838app/build/outputs/apk/release/app-release-unsigned.apk

Signing release APKs

See repo root T383838scripts/sign-android-apks.sh (default glob targets T383838outputs/apk/release/).

Troubleshooting

1. Confirm T383838android/vendor/ contains required T383838.whl files from the wheel build script.
2. Codec2 (voice messages, LXST Codec2 profiles): wheels must include T383838pycodec2/libcodec2.so beside T383838pycodec2.so. The wheel build script repacks automatically; for an existing T383838android/vendor/ tree run T383838python3 scripts/repack-android-pycodec2-wheels.py. Gradle also runs this before sync and copies T383838libcodec2.so into T383838jniLibs per ABI.
3. Run T383838./gradlew :app:assembleDebug with T383838--stacktrace if Python sync or Chaquopy pip steps fail.
4. Re-run T383838./gradlew :app:assembleDebug after changing T383838meshchatx/ assets; sync runs on merge Python sources tasks.

See ../LICENSE for full text and notices.


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────